<?php

namespace plugin\admin\app\model;

use plugin\admin\app\model\Base;

/**
 * @property integer $id (主键)
 * @property integer $aid 抽奖活动ID
 * @property integer $pid 奖品产品ID
 * @property integer $level_id 等级ID
 */
class PrizeDrawGood extends Base
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'wa_prize_draw_goods';

    /**
     * The primary key associated with the table.
     *
     * @var string
     */
    protected $primaryKey = 'id';
    /**
     * Indicates if the model should be timestamped.
     *
     * @var bool
     */
    public $timestamps = false;

    const LEVEL_TEXT = [
        1 => '一等奖',
        2 => '二等奖',
        3 => '三等奖',
        4 => '四等奖',
        5 => '五等奖',
        6 => '六等奖',
    ];

    public static function getLevelText($level)
    {
        return self::LEVEL_TEXT[$level] ?? '';
    }
    
}
